/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* CSS变量定义 - 颜色方案 */
:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --danger: #f72585;
  --warning: #f8961e;
  --dark: #212529;
  --light: #f8f9fa;
  --gray: #6c757d;
  --border: #dee2e6;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* 页面整体样式 */
body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 头部样式 */
header {
  text-align: center;
  padding: 30px 0;
  margin-bottom: 20px;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

header p {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* 主仪表盘布局 - CSS Grid */
.dashboard {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 25px;
}

/* 主内容区域样式 */
.main-content {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border);
}

.tasks-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-actions {
  display: flex;
  gap: 15px;
}

/* 按钮样式 */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray);
}

.btn-outline:hover {
  background: var(--light);
}

/* 任务容器样式 */
.tasks-container {
  padding: 25px;
}

/* 任务列表样式 */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: 30px 0;
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .dashboard {
      grid-template-columns: 1fr;
  }
  
  .form-row {
      grid-template-columns: 1fr;
  }
  
  .tasks-header {
      flex-direction: column;
      gap: 15px;
      align-items: flex-start;
  }
  
  .task-actions {
      width: 100%;
      justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .task-footer {
      flex-direction: column;
      gap: 15px;
      align-items: flex-start;
  }
  
  .stats {
      grid-template-columns: 1fr;
  }
}